<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>生产过程信息</title>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
</head>
<script type="text/javascript">
    	$(function() {
		$('#cc').combotree({
			url : 'pTypeController.do?ptypeCombotree',
		});
	});
  //初始化下标
	function resetTrNum(tableId) {
		$tbody = $("#"+tableId+"");
		$tbody.find('>tr').each(function(i){
			$(':input, select', this).each(function(){
				var $this = $(this), name = $this.attr('name'), val = $this.val();
				if(name!=null){
					if (name.indexOf("#index#") >= 0){
						$this.attr("name",name.replace('#index#',i));
					}else{
						var s = name.indexOf("[");
						var e = name.indexOf("]");
						var new_name = name.substring(s+1,e);
						$this.attr("name",name.replace(new_name,i));
					}
				}
			});
		});
	}
 </script>
<body>
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="3" action="productProgressController.do?doAddOrUpdate">
	<input id="id" name="id" type="hidden" value="${productProgressPage.id }">
	<input id="flag" value="2" name="flag" type="hidden" >
	<table cellpadding="0" cellspacing="1" class="formtable">
		
		
                <tr id="ptypeTr">
					<td align="right">
						<label class="Validform_label">
							产品分类:
						</label>
					</td>
					<td class="value">
						<input id="cc" name="typeId.id" class="easyui-combotree" value="${productProgressPage.typeId.name}"  style="width:200px;height:26px">
						<span class="Validform_checktip"></span>

					</td>
				</tr>
	</table>
	<div style="width: auto; height: 200px;"><%-- 增加一个div，用于调节页面大小，否则默认太小 --%>
	
	<t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
		<t:tab href="productProgressController.do?goPeriodList&typeId=${productProgressPage.typeId.id}" icon="icon-search" title="生产过程" id="period"></t:tab>
		
	</t:tabs>
	</div>
</t:formvalid>
<!-- 添加 明细 模版 -->
<table style="display: none">
	<tbody id="add_period_table_template">
		<tr>
			<td align="center"><input style="width: 20px;" type="checkbox" name="ck" /></td>
			<td align="left"><input nullmsg="请输入生产过程名称！" datatype="s2-10" errormsg="生产过程名称应该为2到10位" name="progressList[#index#].periodName" maxlength="100" type="text"
				style="width: 220px;"></td>
			<td align="left"><input nullmsg="请输入生产时间！" datatype="n" errormsg="生产时间必须为数字" name="progressList[#index#].periodTime" maxlength="10" type="text" style="width: 120px;"></td>
			<td align="left"><input name="progressList[#index#].remark" maxlength="200" type="text" value="" style="width: 120px;"></td>
		</tr>
	</tbody>
	
</table>

</body>